package com.pojoin.cms.verification;

import com.pojoin.cms.domain.User;
import com.pojoin.cms.service.UserService;

public class VerificationLocal implements Verification {
	
	private UserService userService;
	

	public UserService getUserService() {
		return userService;
	}


	public void setUserService(UserService userService) {
		this.userService = userService;
	}


	@Override
	public boolean verify(String userName, String passwd) {
		User user = this.userService.getUserByUserName(userName);
		if(user != null && user.getPassword().equals(passwd)){
			return true;
		}
		return false;
	}

}
